package com.symria.system.util;

import java.util.HashMap;
import java.util.Map;

import com.symria.framework.util.Config;
import com.symria.framework.util.HttpClientUtils;
import com.symria.framework.util.StringUtil;

public class CallPushManager {
    public static final String URL = Config.getValue("update.memcached.push");
	public static void refreshAdCache(Integer adId){
		if(!StringUtil.isEmpty(URL)){
			Map<String, String> map = new HashMap<String, String>();
			map.put("adId", adId+"");
			map.put("type", "adcache");
			HttpClientUtils.postFromUrl(URL, map);
		}
	}
	public static void refreshAppCache(String pid){
		if(!StringUtil.isEmpty(URL)){
			Map<String, String> map = new HashMap<String, String>();
			map.put("publicId", pid);
			map.put("type", "app");
			HttpClientUtils.postFromUrl(URL, map);
		}
	}
	
}
